package hibernate2;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Table(name = "player")
@Entity
public class Teacher {
	@Override
	public String toString() {
		return "Teacher [id=" + id + ", name=" + name + "]";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Id
//	@ManyToMany 
//	@JoinTable(name="teacher_has_student"),
//		JoinColumns = @JoinColumn(name = "teacher_id"),
//		
	private Set<Player>players;
	@Column(name = "id")
		private int id;
	
	@Column(name = "name")
		private String  name;

}
